<%@ page contentType="text/html;charset=UTF-8" trimDirectiveWhitespaces="true" language="java" %>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>Demo</title>
    <script type="text/javascript">
		var ocxObject;
		function pageLoad(){
			ocxObject = document.getElementById("OcxObject");
			ocxObject.SetOcxMode(0);
		}

		//var config = "<?xml version='1.0' encoding='UTF-8'?><Message><Window index='1' /><Camera><Id>18</Id><IndexCode>14082506001310010872</IndexCode><Name>DS-2CD4032FWD-41.100-Camera 01</Name><DevType>0</DevType><RecLocation>2</RecLocation></Camera><Query><ZoneId>1</ZoneId><Vrm ip='10.21.36.25' port='6300' /></Query><Privilege>7</Privilege></Message>";

		function setConfig(){
			var configN = document.getElementById("config").value;
			ocxObject.SetPlayBackParam(configN);
		}

		   /*****搜索录像******/
		function StartQueryRecord(){
			StartTime = document.getElementById("TextStartTime").value;
			EndTime = document.getElementById("TextEndTime").value;
			RecType = document.getElementById("TextRecType").value;
			strXML = "<?xml version='1.0'?><Message><Time><!--录像开始时间--><Begin>"+StartTime+"</Begin><!--录像结束时间--><End>"+EndTime+"</End></Time><!--录像类型1-计划录像2-移动录像4-报警录像16-手动录像23-全部录像--><RecType>"+RecType+"</RecType></Message>";

			ocxObject.StartQueryRecord(strXML);
		}
	
	</script>
   
</head>
<body onLoad="pageLoad();">
	

	<div>
		<object classid="clsid:5DEF5889-AD46-4fc0-AEBE-B54E6CD71C96" id="OcxObject" width="800" height="500" name="OcxObject"></object>
	</div>
	<div>1.请调用webservice接口CuService中的getVrmServiceByCameraIndexCodes方法来获得参数报文，把获得的XML按文档说明额外设置后填入下方的文本域</div>
	<div id = "preview">
		<tr>
		<td>
		  <label for="config"></label>
		  <textarea name="config" id="config" cols="45" rows="5" value=""></textarea>
		  <input type="button" name="设置监控点参数"  value="设置监控点参数" onClick="setConfig();">
		</td>
		</tr>
	</div>
	<div>2.设置搜索时间</div>
	<div>
		 <table width="50%" style="border: thin solid #C0C0C0" >
                <tr>
                    <td width="25%" align="center">开始时间</td>
                    <td width="75%"><input id="TextStartTime" style="width:130px" type="text" value="2014-08-26 00:00:00" /></td>
                </tr>
                <tr>
                    <td align="center">结束时间</td>
                    <td><input id="TextEndTime" style="width:130px" type="text" value="2014-08-26 23:59:59" /></td>
                </tr>
                <tr>
                    <td align="center">录像类型</td>
                    <td><input id="TextRecType" style="width:130px" type="text" value="23" /></td>
                </tr>
                <tr>
                    <td align="center">&nbsp;</td>
                    <td><input type="button" value="开始搜索" onclick = "StartQueryRecord()" /></td>
                </tr>
            </table>
	</div>
</body>
</html>